import service from "./index.js";

// 按需导出
// 获取页数
export function pageCount(data) {
    return service({
        url: '/admin/department/page/count',
        method: 'get',
        params: data
    })
}
// 获取列表数据
export function page(data, page) {
    return service({
        url: '/admin/department/page/' + page,
        method: 'get',
        params: data
    })
}
// 获取数据详情
export function departmentName(id) {
    return service({
        url: '/admin/department/' + id,
        method: 'get',
    })
}
// 添加
export function departmentAdd(data) {
    return service({
        url: '/admin/department',
        method: 'post',
        data: data
    })
}
// 删除
export function mixinDelete(id) {
    return service({
        url: '/admin/department/' + id,
        method: 'delete',
    })
}
// 修改
export function departmentEdit(data) {
    return service({
        url: '/admin/department',
        method: 'put',
        data: data
    })
}